#ifndef _OI_LT360BASE_DATAVIEWER_HPP_
#define _OI_LT360BASE_DATAVIEWER_HPP_

#include "OiLT360Base.hpp"

namespace Oi
{
    namespace Appl
    {
        class OI_LT360BASE_API DataViewer : public QDialog
        {
            Q_OBJECT
        public:
            DataViewer(QWidget* parent, QString name, int displayIntervalSeconds, float minValue = -1, float maxValue = -1, float upperWarning = -1, float lowerWarning = -1);

        public:
            ~DataViewer();

        public:
            void updateData(double value);
            void updateDisplayData(double value);

        public slots:
            void updateCpCpk();
            void adjustLabels();

        signals:
            void moved(QPoint);
            void requestContextMenu(QPoint);
            void settingChanged();

        protected:
            void resizeEvent(QResizeEvent*);
            void moveEvent(QMoveEvent* event);
            void closeEvent(QCloseEvent* event);
            void contextMenuEvent(QContextMenuEvent* e);
            void showEvent(QShowEvent* event);
            void hideEvent(QHideEvent* event);

        private:
            OI_DISABLE_COPY(DataViewer);
            OI_DECLARE_IMPL(DataViewer);
        };
    }
}

#endif